<template>
  <div class="main-footer" :class="showFixed ? 'active' : ''">
    <div class="main-footer__content" :style="{ backgroundColor: backgroundColor }">
      <!-- <div class="footer-box main-container-content">
        <ul class="footer-box-ul">
          <el-row :gutter="0">
            <el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6">
              <li class="footer-box-li">
                <span class="footer-box-li-icon first"></span>
                <span>客服电话：{{ indexManageInfo.frontPhone }}</span>

              </li>
            </el-col>
            <el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6">
              <li class="footer-box-li">
                <span class="footer-box-li-icon second"></span>
                <span>客服邮箱：{{ indexManageInfo.frontEmail }}</span>
              </li>
            </el-col>

            <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
              <li class="footer-box-li">
                <span class="footer-box-li-icon three"></span>
                <span>地址：{{ indexManageInfo.frontAddress }}</span>
              </li>
            </el-col>

          </el-row>
        </ul>

      </div> -->
      <!-- <div class="main-footer__copyright">Copyright © 2019 - {{ dateNum }}
      </div> -->
      <div class="main-footer__copyright"> Copyright © 2019 - {{ dateNum }}本平台由上海爱可及医疗科技有限公司提供技术支持</div>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  props: {
    backgroundColor: {
      type: String,
      default: 'rgba(58, 98, 215, 0)'
    },
    color: {
      type: String,
      default: '#fff'
    },
    showFixed: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      dateNum: new Date().getFullYear(),
    }
  },
  computed: {
    ...mapState({
      indexManageInfo: state => state.indexManageInfo
    })
  }
}
</script>

<style lang="scss" scoped>
.main-footer {
  &__content {
    background: #3a62d7;
  }

  &__copyright {
    text-align: center;
    padding: 5px 0;
    font-size: 14px;
    font-weight: 400;
    color:rgba(44,43,43,0.5);
  }
}

.main-footer.active {
  position: fixed;
  z-index: 5;
  bottom: 0px;
  left: 0px;
  width: 100%;
}

.footer-box {
  margin: 0 auto;
  overflow: hidden;

  .footer-box-ul {
    list-style: none;

    margin: 0;
    padding: 5px 0px;

    .footer-box-li {
      font-size: 14px;
      font-weight: 400;
      color: #ffffff;
      line-height: 20px;
      background-repeat: no-repeat;
      background-position: 0 0;
      padding-left: 10px;
      display: flex;
      /*align-items: center;*/

      .footer-box-li-icon {
        display: block;
        width: 20px;
        height: 18px;
        background-size: contain;
        background-repeat: no-repeat;
        margin-right: 5px;
      }

      & .first {

        background-image: url('/images/index/icon-dianhua.png');

      }

      & .second {

        background-image: url('/images/index/icon-youxiang.png');


      }

      & .three {

        background-image: url('/images/index/icon-dizhi.png');

      }
    }
  }
}

.contact {
  float: right;
  padding: 80px 0 20px;
  overflow: hidden;
  font-size: 0;

  &__img {
    width: 100px;
    height: 100px;
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.4);
    padding: 7px;
    vertical-align: middle;
    box-sizing: border-box;
  }

  &__right {
    vertical-align: middle;
    display: inline-block;
    margin-left: 20px;
  }

  &__btn {
    background: rgba(255, 255, 255, 0.21);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    line-height: 20px;
    padding: 10px 50px;
    cursor: pointer;

    &:first-child {
      margin-bottom: 20px;
    }
  }
}
</style>
